package cn.piesat.scanning.service.impl;

import cn.piesat.scanning.dao.HtScheduleJobDAO;
import cn.piesat.scanning.dto.HtScheduleJobDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * 调度任务相关服务层接口的实现
 */
@Service("htScheduleJobService")
public class HtScheduleJobServiceImpl implements cn.piesat.scanning.service.HtScheduleJobService {

    @Autowired
    private HtScheduleJobDAO htScheduleJobDAO;

    /**
     * 根据任务ID查询任务的详细信息
     * @param id 任务ID
     * @return
     */
    @Override
    public HtScheduleJobDTO findById(String id) {
        Optional<HtScheduleJobDTO> byId = htScheduleJobDAO.findById(id);
        return byId.orElse(null);
    }
}
